<template>
  <div class="code-layout">
    <div class="code-materials">
      <md-preview :biz_id="detailDataNow.id" type="build-image" class="preview" />
    </div>
    <div class="code-info">
      <h3 class="info-title">基本信息</h3>
      <ul class="info-item">
        <li>
          <span class="key">名称:</span>
          <span class="val">{{ detailDataNow.name }}</span>
        </li>
        <li>
          <span class="key">别名： </span>
          <span class="val">{{ detailDataNow.alias }}</span>
        </li>
        <li>
          <span class="key"> 创建人： </span>
          <span class="val">{{
            detailDataNow.create_user && (detailDataNow.create_user &&
              detailDataNow.create_user.nick_name ||
              detailDataNow.create_user && detailDataNow.create_user.username)
          }}</span>
        </li>
        <li>
          <span class="key">创建时间： </span>
          <span class="val">{{ detailDataNow.create_time }}</span>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      detailDataNow: {},
      //  detailData: {}
    };
  },
  props: ['detailData'],
  watch: {
    detailData(val) {
      this.detailDataNow = val
    },
  },
  async created() {

  },

  async mounted() {
    this.$nextTick(() => {
      console.log(this.detailData)
    })
  },
  destroyed() {

  },
  methods: {
    editState(state) {
      console.log(state)
    }
  }
}
</script>
<style lang="less" scoped>
@import "~@/assets/css/code.less";
</style>